{extend name="public:base" /}

{block name="breadcrumb"}
<ul class="breadcrumb">
    <li>
        <i class="ace-icon fa fa-home home-icon"></i>
        系统设置
    </li>
    <li><a href="{:url('lists')}">角色管理</a></li>
    <li class="active">角色列表</li>
</ul>
{/block}

{block name="content"}
<div class="page-header">
    <div class="row maintop">
        <div class="col-xs-12 col-sm-2">
            <a href="{:url('add')}">
                <button class="btn btn-xs btn-danger">
                    <i class="ace-icon fa fa-bolt bigger-110"></i>
                    添加用户组
                </button>
            </a>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-xs-12">
        <div>
            <form id="leftnav" name="leftnav" method="post" action="" >
                <input type="hidden" name="checkk" id="checkk" value="1" /><!--用于判断操作类型-->
                <table class="table table-striped table-bordered table-hover" id="dynamic-table">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>用户组名</th>
                        <th>状态</th>
                        <th class="hidden-sm hidden-xs">添加时间</th>
                        <th style="border-right:#CCC solid 1px;">操作</th>
                    </tr>
                    </thead>

                    <tbody>

                    {foreach name="list" item="vo"}
                        <tr>
                            <td height="28">{$vo.id}</td>
                            <td>{$vo.title}</td>
                            <td id="h{$v.id}">
                                {if condition="$vo['status'] eq 1"}
                                    <a class="red open-btn" href="{:url('admin_group_state')}" data-id="{$vo.id}" title="已开启">
                                        <div id="zt{$vo.id}"><button class="btn btn-minier btn-yellow">开启</button></div>
                                    </a>
                                    {else/}
                                    <a class="red open-btn" href="{:url('admin_group_state')}" data-id="{$vo.id}" title="已禁用">
                                        <div id="zt{$vo.id}"><button class="btn btn-minier btn-danger">禁用</button></div>
                                    </a>
                                {/if}
                            </td>
                            <td class="hidden-sm hidden-xs">{$vo.addtime|date='Y-m-d',###}</td>
                            <td>
                                <div class="hidden-sm hidden-xs action-buttons">
                                    <a class="blue" href="{:url('access',array('id'=>$vo['id']))}" title="配置规则">
                                        <i class="ace-icon fa fa-cog bigger-130"></i>
                                    </a>
                                    <a class="green" href="{:url('edit',array('id'=>$vo['id']))}" title="修改">
                                        <i class="ace-icon fa fa-pencil bigger-130"></i>
                                    </a>
                                    <a class="red confirm-rst-url-btn" href="{:url('del',array('id'=>$vo['id']))}" data-info="你确定要删除吗？" title="删除">
                                        <i class="ace-icon fa fa-trash-o bigger-130"></i>
                                    </a>
                                </div>
                                <div class="hidden-md hidden-lg">
                                    <div class="inline position-relative">
                                        <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown" data-position="auto">
                                            <i class="ace-icon fa fa-cog icon-only bigger-110"></i>
                                        </button>
                                        <ul class="dropdown-menu dropdown-only-icon dropdown-yellow dropdown-menu-right dropdown-caret dropdown-close">
                                            <li>
                                                <a href="{:url('access',array('id'=>$vo['id']))}" class="tooltip-success" data-rel="tooltip" title="" data-original-title="配置规则">
                                                    <span class="green">
                                                        <i class="ace-icon fa fa-cog bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="{:url('edit',array('id'=>$vo['id']))}" class="tooltip-success" data-rel="tooltip" title="" data-original-title="修改">
                                                    <span class="green">
                                                        <i class="ace-icon fa fa-pencil-square-o bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>

                                            <li>
                                                <a href="{:url('del',array('id'=>$vo['id']))}"  data-info="你确定要删除吗？" class="tooltip-error confirm-rst-url-btn" data-rel="tooltip" title="" data-original-title="删除">
                                                    <span class="red">
                                                        <i class="ace-icon fa fa-trash-o bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    {/foreach}
                    <tr>
                        <td height="50" colspan="6" align="left">&nbsp;</td>
                    </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
</div>
{/block}